<?php if (!defined('THINK_PATH')) exit();?><html>
<head>
<title>商品管理:修改</title>
   <script src="/drclothes/Public/js/jquery.min.js"></script>
<script src="/drclothes/Public/js/bootstrap.min.js"></script>
<link href="/drclothes/Public/css/bootstrap.min.css" rel="stylesheet">
<link href="/drclothes/Public/css/admin.css" rel="stylesheet">
<script>
    $(document).ready(function () {
    //高亮当前选中的导航
    var myNav = $(".nav-sidebar > li > a");
    for (var i = 0; i < myNav.length; i++) {
        var links = myNav.eq(i).attr("href");
        var myURL = document.URL;
        var durl=/http:\/\/([^\/]+)\//i;
        domain = myURL.match(durl);
        console.log(myURL.match(durl));
        var result = myURL.replace("http://"+domain[1],"");
        if (links == result) {
            myNav.eq(i).parents("li").addClass("active");
        }
    }
});
</script>
</head>

<body>
    <nav class="navbar navbar-inverse navbar-fixed-top">
        <div class="container" style="background-color:#095dd1;">
            <div class="navbar-header">
                <button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#navbar" aria-expanded="false"
                    aria-controls="navbar">
            <span class="sr-only">Drclothes后台管理系统</span>
            <span class="icon-bar"></span>
            <span class="icon-bar"></span>
            <span class="icon-bar"></span>
          </button>
                <a class="navbar-brand" href="#">Drclothes后台管理系统</a>
            </div>
            <div id="navbar" class="navbar-collapse collapse">
                <ul class="nav navbar-nav navbar-right">
                    <li><a style="background-color:rgba(1,1,1,0.5);top:0px;" class="glyphicon glyphicon-user"> <?php echo I('session.usernameA'); ?></a></li>
                    <li><a href="/drclothes/index.php/admin/form/logout"  style="background-color:rgba(1,1,1,0.5);">退出</a></li>
                </ul>
            </div>
        </div>
    </nav>
    <div class="container">
        <div class="row">
            <div class="col-xs-2 padding1" style="background-color:rgba(255,255,255,0.5);padding-top:0px;min-height:100%;">
                <ul class="nav nav-sidebar">
                    <li><a href="/drclothes/index.php/admin/Order" class="glyphicon glyphicon-tags"> 订单管理</a></li>
                    <li><a href="/drclothes/index.php/admin/drclothes" class="glyphicon glyphicon-inbox"> 商品管理</a></li>
                    <li><a href="/drclothes/index.php/admin/User" class="glyphicon glyphicon-user"> 用户列表</a></li>
                    <li><a href="/drclothes/index.php/admin/News" class="glyphicon glyphicon-edit"> 公告列表</a></li>
                    <li><a href="/drclothes/index.php/admin/Comment" class="glyphicon glyphicon-comment"> 评论管理</a></li>
                </ul>
            </div>
            <div class="col-xs-10 main">
          <p class="pull-right" style="margin-top: 20px;"><a class="btn btn-info" href="/drclothes/index.php/admin/drclothes">返回</a></p>
          <h2 class="sub-header">商品管理:修改商品<small><?php echo ($list["name"]); ?></small></h2>
          <form class="form-horizontal" action="/drclothes/index.php/admin/drclothes/change_process" method="post" enctype="multipart/form-data" autocomplete="off">
          <!-- 文本框-->
          <div class="form-group">
            <label class="col-md-4 control-label" for="name">商品名</label>  
            <div class="col-md-4">
            <input id="id" name="id" type="hidden"  value="<?php echo ($list["id"]); ?>" class="form-control input-md" />

            <input id="name" name="name" type="text"  value="<?php echo ($list["name"]); ?>" class="form-control input-md" />
              
            </div>
          </div>
          <!-- 文本域-->
          <div class="form-group">
            <label class="col-md-4 control-label" for="description">描述</label>  
            <div class="col-md-4">                     
              <textarea class="form-control" id="description" name="description" rows="10" placeholder="在此输入内容" required><?php echo ($list["description"]); ?></textarea>
            </div>
          </div>

          <!-- 文本框-->
          <div class="form-group">
            <label class="col-md-4 control-label" for="price">价格</label>  
            <div class="col-md-4">
            <div class="input-group">
      <span class="input-group-addon">￥</span>
            <input id="price" name="price" type="text" value="<?php echo ($list["price"]); ?>" class="form-control input-md" />
            </div>
              
            </div>
          </div>

          <!-- 文件按钮 --> 
          <div class="form-group">
            <label class="col-md-4 control-label" for="img">图片</label>
            <div class="col-md-4">
              <img class="img-responsive img-rounded center-block" width="800px" src="/drclothes/Public/<?php echo ($list["img"]); ?>"/>
              <span class="help-block">位置：/drclothes/Public/<?php echo ($list["img"]); ?></span>
              <input id="img" name="img" class="input-file" type="file" />
            </div>
          </div>

          <!-- 双按钮 -->
          <div class="form-group">
            <label class="col-md-4 control-label">操作</label>
            <div class="col-md-8">
              <button type="submit" class="btn btn-info">提交</button>
          <!--     <button type="reset" class="btn btn-default">还原</button> -->
            </div>
          </div>
          </form>
        </div>
      </div>
    </div>
</body>
</html>